package util;

public class ConnectionConfig {
	private String serverName;
	private String user;
	private String password;
	private String port;
	private String databaseName;
	private int typeOfDBS;

	public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPort() {
		return port;
	}

	public void setPort(String port) {
		this.port = port;
	}

	public String getDatabaseName() {
		return databaseName;
	}

	public void setDatabaseName(String databaseName) {
		this.databaseName = databaseName;
	}

	public int getTypeOfDBS() {
		return typeOfDBS;
	}

	public void setTypeOfDBS(int typeOfDBS) {
		this.typeOfDBS = typeOfDBS;
	}

	public void setTypeOfDBS(String typeOfDBS) {
		if ("mysql".equalsIgnoreCase(typeOfDBS)) {
			this.typeOfDBS = TypeOfDatabaseSystem.MYSQL;
		}
		if ("sqlserver".equalsIgnoreCase(typeOfDBS)) {
			this.typeOfDBS = TypeOfDatabaseSystem.MSSQLSERVER;
		}
	}
}
